home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4530 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  942 b 

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: a pointer problem
  5. Date: 5 Feb 1996 17:28:08 GMT
  6. Organization: OpenVision
  7. Message-ID: <4f5en8$oll@spanky.pls.ov.com>
  8. References: <4errk0$4c3@srvr1.engin.umich.edu>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article 4c3@srvr1.engin.umich.edu, cjlin@news-server.engin.umich.edu (Chih-Jen Lin) writes:
  13. >Hi, 
  14. >
  15. >This is an old problem of C. I remember a pointer may point
  16. >to any one address when it's declaired. Is there any way to
  17. >avoid this problem in ANSI C ? Or how can I let a variable be
  18. >NULL while it's declaired ?
  19. >
  20. >Thanks in advance.
  21. >
  22. >Chih-Jen Lin
  23.  
  24.  
  25. It doesn't matter when you initialize a pointer, as long as you
  26. always initialize it before you dereference it.  It has always
  27. been the rule in any computer language to write memory before
  28. you read it.  (This isn't news, is it?)
  29.  
  30.             Fletcher.Glenn@ov.com
  31.  
  32.  
  33.